package com.zunipe.trainticketsystem.util;

import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.Random;

public class RandomUtil {
    public static final Random r = new Random();

    public static String generateOrderNumber() {
        String orderNumber = "GSK";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm", Locale.CHINA);
        orderNumber += sdf.format(System.currentTimeMillis());
        for (int i = 0; i < 8; ++i) {
            orderNumber += String.valueOf(r.nextInt(10));
        }
        return orderNumber;
    }
}
